<template>
  <div class="search-wrapper">
    <form onsubmit="return false;" @keyup.enter="search">
      <mt-search v-model="keyword" cancel-text="取消" placeholder="搜索"></mt-search>
    </form>
  </div>
</template>

<script>
  export default {
    name: "search",
    data() {
      return {
        keyword: ''
      };
    },
    methods: {
      search() {
        this.$emit('search', this.keyword)
      }
    }
  };
</script>

<style>
  .search-wrapper {
    position: fixed;
    width: 100%;
    top: 0;
  }
</style>
